<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Module: UsersHelper
  
    &mdash; Documentation by YARD 0.7.3
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (U)</a> &raquo; 
    
    
    <span class="title">UsersHelper</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Module: UsersHelper
  
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">app/helpers/users_helper.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
ELMO - Secure, robust, and versatile data collection. Copyright 2011 The
Carter Center
</p>
<p>
ELMO is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
</p>
<p>
ELMO is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
</p>
<p>
You should have received a copy of the GNU General Public License along
with ELMO. If not, see &lt;http://www.gnu.org/licenses/&gt;.
</p>


  </div>
</div>
<div class="tags">
  

</div>




  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#format_users_field-instance_method" title="#format_users_field (instance method)">- (Object) <strong>format_users_field</strong>(user, field) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#users_index_fields-instance_method" title="#users_index_fields (instance method)">- (Object) <strong>users_index_fields</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#users_index_links-instance_method" title="#users_index_links (instance method)">- (Object) <strong>users_index_links</strong>(users) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  



  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="format_users_field-instance_method">
  
    - (<tt>Object</tt>) <strong>format_users_field</strong>(user, field) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


21
22
23
24
25
26
27
28
29
30
31</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/helpers/users_helper.rb', line 21</span>

<span class='def def kw'>def</span> <span class='format_users_field identifier id'>format_users_field</span><span class='lparen token'>(</span><span class='user identifier id'>user</span><span class='comma token'>,</span> <span class='field identifier id'>field</span><span class='rparen token'>)</span>
  <span class='case case kw'>case</span> <span class='field identifier id'>field</span>
  <span class='when when kw'>when</span> <span class='string val'>&quot;email&quot;</span> <span class='then then kw'>then</span> <span class='mail_to identifier id'>mail_to</span><span class='lparen token'>(</span><span class='user identifier id'>user</span><span class='dot token'>.</span><span class='email identifier id'>email</span><span class='rparen token'>)</span>
  <span class='when when kw'>when</span> <span class='string val'>&quot;language&quot;</span> <span class='then then kw'>then</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='language identifier id'>language</span><span class='dot token'>.</span><span class='name identifier id'>name</span>
  <span class='when when kw'>when</span> <span class='string val'>&quot;active?&quot;</span> <span class='then then kw'>then</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='active? fid id'>active?</span> <span class='integer val'>? </span><span class='string val'>&quot;Yes&quot;</span> <span class='colon op'>:</span> <span class='string val'>&quot;No&quot;</span>
  <span class='when when kw'>when</span> <span class='string val'>&quot;actions&quot;</span>
    <span class='action_links identifier id'>action_links</span><span class='lparen token'>(</span><span class='user identifier id'>user</span><span class='comma token'>,</span> <span class='symbol val'>:exclude</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='symbol val'>:show</span><span class='comma token'>,</span>
      <span class='symbol val'>:destroy_warning</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='dstring node'>&quot;Are you sure you want to delete #{user.name}?&quot;</span><span class='rparen token'>)</span>
  <span class='else else kw'>else</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='field identifier id'>field</span><span class='rparen token'>)</span>
  <span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="users_index_fields-instance_method">
  
    - (<tt>Object</tt>) <strong>users_index_fields</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


18
19
20</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/helpers/users_helper.rb', line 18</span>

<span class='def def kw'>def</span> <span class='users_index_fields identifier id'>users_index_fields</span>
  <span class='dstring node'>%w[name login email language role device phone_number active? actions]</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="users_index_links-instance_method">
  
    - (<tt>Object</tt>) <strong>users_index_links</strong>(users) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


32
33
34
35
36
37
38</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/helpers/users_helper.rb', line 32</span>

<span class='def def kw'>def</span> <span class='users_index_links identifier id'>users_index_links</span><span class='lparen token'>(</span><span class='users identifier id'>users</span><span class='rparen token'>)</span>
  <span class='lbrack token'>[</span>
    <span class='batch_op_link identifier id'>batch_op_link</span><span class='lparen token'>(</span><span class='symbol val'>:name</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;Send Broadcast&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:action</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;broadcasts#new_with_users&quot;</span><span class='rparen token'>)</span><span class='comma token'>,</span>
    <span class='batch_op_link identifier id'>batch_op_link</span><span class='lparen token'>(</span><span class='symbol val'>:name</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;Export as vCard&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:action</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;users#export&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:format</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='symbol val'>:vcf</span><span class='rparen token'>)</span><span class='comma token'>,</span>
    <span class='link_to_if_auth identifier id'>link_to_if_auth</span><span class='lparen token'>(</span><span class='string val'>&quot;Create new user&quot;</span><span class='comma token'>,</span> <span class='new_user_path identifier id'>new_user_path</span><span class='comma token'>,</span> <span class='string val'>&quot;users#create&quot;</span><span class='rparen token'>)</span>
  <span class='rbrack token'>]</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Thu Dec  8 13:43:18 2011 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.3 (ruby-1.8.7).
</div>

  </body>
</html>